<template>
    <view class="com_box flex-lr">
        <uv-icon name="/static/public/logo.png" size="35"></uv-icon>
        <uv-icon name="/static/public/RWA.png" width="139rpx" height="56rpx"></uv-icon>
        <view class="flex-align-center">
            <view class="but" @click="storeUser.connectWallet">{{ storeUser.address ? cut_address(storeUser.address) :
                '链接钱包' }}</view>
            <uv-icon name="/static/public/locale.png" size="25" @click="switchLocaleRef.open()"></uv-icon>
        </view>
    </view>
    <switchLocale ref="switchLocaleRef" />
</template>

<script setup>
import { ref } from "vue";
import { cut_address } from "@/util/tool";
import useStoreUser from "@/store/modules/user";
const storeUser = useStoreUser();
const switchLocaleRef = ref(null);

</script>
<style lang="scss" scoped>
.com_box {
    padding: 30rpx 0;
    background-color: #000;

    .but {
        border-radius: 15rpx;
        background-image: linear-gradient(to bottom, #3DA7ED 0%, #2E3ADE 100%);
        padding: 10rpx 20rpx;
        margin-right: 20rpx;
    }
}
</style>